package com.xscha.soyue.common.core.exception.status;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Title: CommonStatusCode Description: SoYue通用code
 *
 * @author Vondser
 * @version V2024.1.0
 * @date 2023/12/12
 */
@Getter
@AllArgsConstructor
public enum CommonStatusCode implements SoyStatusCode {

	CONFIG_ERROR(-1, "应用初始化失败，配置错误"), SUCCESS(0, "操作成功"), ARG_INVALID(400, "参数错误"),
	UNAUTHORIZED(401, "认证失败"), CLIENT_UNAUTHORIZED(401, "client认证失败"), INVALID_TOKEN(401, "令牌不存在或已失效"),
	FORBIDDEN(403, "没有权限，拒绝访问"), DECODE_ERROR(-1, "解码错误"), ERROR(-1, "服务器错误"),
	INVALID_SIGN(403, "无效的签名，拒绝访问"), NONE_INIT(-1, "应用没有初始化"), DATA_CONVERT_ERROR(-1, "数据转换错误"),
	UNSUPPORTED_OPERATION(405, "不支持的操作"), BUS_HANDLER_GENERICS_ERROR(-1, "Bus初始化失败，泛型错误"),
	USER_NOT_EXIST(-1, "令牌自省失败，用户不存在"), DATE_EXISTED(-1, "数据已经存在"),
	MAX_LOGIN_ERROR_COUNT(401, "超出错误次数上限，账户已被锁定"), DATA_NOT_EXIST(-1, "数据不存在"),
	SYSTEM_EXECUTION_ERROR(-1, "系统执行出错"), NUMBER_FORMAT_ERROR(-1, "Error converting ID to Long: "),
	UPLOAD_FILE_ERROR(-1, "上传失败"), FILE_NOT_SUPPORT_HTML(-1, "uploading html files is not currently supported"),
	UPLOAD_TOO_FREQUENT(-1, "上传过于频繁，请稍后再试"),FILE_DOWN_FAIL(-1, "文件下载失败"),
	FILE_GET_ERROR(-1, "Minio获取异常"), HTTP_UNAVAILABLE(503, "HTTP UNAVAILABLE");


	;

	private final Integer code;

	private final String message;

}
